<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1 {
            color: green;
            text-align: center;
        }
        .container {
            display: grid;
             /*grid-template-columns: auto auto auto auto;*/
             /*grid-template-columns: repeat(4,auto); */
             /*grid-template-columns: 200px 400px auto;*/
            /*grid-template-columns: 1fr 3fr;*/
             /*grid-template-columns: repeat(2,1fr) repeat(2,2fr);*/
            
            /* grid-template-rows: 60px repeat(3, 80px); */
            grid-template-rows: auto;
            grid-gap: 1em;
        }
        .container>div {
            border: 1px solid black;
            border-radius: 3px;
            background: yellowgreen;
            padding: 1em;
            text-align: center;
            color: darkgreen;
        }
    </style>
</head>
<body>
    <h1>ABCDEFG</h1>
    <div class="container">
        <div>abcdefg 1</div>
        <div>abcdefg 2</div>
        <div>abcdefg 3</div>
        <div>abcdefg 4</div>
        <div>abcdefg 5</div>
        <div>abcdefg 6</div>
        <div>abcdefg 7</div>
        <div>abcdefg 8</div>
    </div>
</body>
</html>